<?php /* Smarty version 2.6.19, created on 2010-10-27 14:15:55
         compiled from cart_orderform_inc.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'number_format', 'cart_orderform_inc.html', 171, false),)), $this); ?>
<table width="726" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td width="726" align="left" valign="top"><table border="0" align="center" cellpadding="0" cellspacing="0">
                          <tr>
                            <td height="8px"></td>
                          </tr>
                        </table>
                        <br />
                        <form id="form1" name="form1" method="post" action="cart_orderview.php" onsubmit="return ck()">
 <script language="javascript" type="text/javascript">
function checkemail(str){ 
var sReg = /[_a-zA-Z\d\-\.]+@[_a-zA-Z\d\-]+(\.[_a-zA-Z\d\-]+)+$/; 
if ( ! sReg.test(str) ) 
{ 

return false; 
} 

return true; 
}

function NumberIS(num)
{
    for(var i=0;i<num.length;i++)
    {
        if(num.charAt(i)<'0' || num.charAt(i)>'9')
        {
        return false;
        }
    }
	return true;
}


function ck()
{

if(document.getElementById("username").value.length==0)
{
alert("收货人姓名不能为空")
return false;
}





if(document.getElementById("dizhi").value.length==0)
{
alert("地址不能为空")
return false;
}

if(document.getElementById("email").value!=""){
if(checkemail(document.getElementById("email").value)!=true)
{
alert("收货人email格式不正确")
return false;
}
}

if(document.getElementById("youbian").value!=""){
	if(!NumberIS(document.getElementById("youbian").value))
	{
	//alert('邮政编码必须为数字类型');
//	return false;	
	}
if(document.getElementById("youbian").value.length<4)
{
//alert("请输入正确的邮政编码")
//return false;
}
}

	if(!NumberIS(document.getElementById("shouji").value))
	{
		alert('电话号码必须为数字类型');
	return false;	
	}
if(document.getElementById("shouji").value.length==0)
{
alert("电话号码不能为空")
return false;
}


return true;
}


</script>
                          
                          <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
                            <tr> 
                              <td colspan="2" bgcolor="#f1f1f1">订货信息</td>
                            </tr>
                            <tr bgcolor="#FFFFFF"> 
                              <td width="13%">&nbsp;</td>
                              <td width="87%"><table width="98%" border="0" align="center" cellpadding="2" cellspacing="2">
                                <tr>
                                  <td>收货人姓名：</td>
                                  <td><div align="left">
                                    <input name="username" type="text" id="username" value="<?php echo $this->_tpl_vars['grs']['username']; ?>
" size="20" />
                                    <font color="#FF0000">*</font>&nbsp;性别
                                    <label>
                                      <input name="sex" type="radio" value="0" checked="checked" />
                                      男
                                    </label>
                                    <input type="radio" name="sex" value="1" />
                                    女</div></td>
                                </tr>
                                <tr>
                                  <td>手 机：</td>
                                  <td><div align="left">
                                    <input name="shouji" type="text" id="shouji" value="<?php echo $this->_tpl_vars['grs']['shouji']; ?>
" size="20"/>
                                    <font color="#FF0000"> *&nbsp;</font></div></td>
                                </tr>
                                
                                <tr> 
                                  <td width="18%">详细地址：</td>
                                  <td width="82%" align="left"> <div align="left"> 
                                    <input name="dizhi" type="text" id="dizhi" value="<?php echo $this->_tpl_vars['grs']['dizhi']; ?>
" size="50"/>
                                    <font color="#FF0000"> *&nbsp; </font></div></td>
                                </tr>
                                <tr> 
                                  <td width="18%">邮政编码：</td>
                                  <td width="82%" align="left"> <div align="left"> 
                                    <input name="youbian" type="text" id="youbian" value="<?php echo $this->_tpl_vars['grs']['youbian']; ?>
" size="20"/>
                                  </div></td>
                                </tr>
                                <tr> 
                                  <td width="18%">联系电话：</td>
                                  <td width="82%" align="left"> <div align="left">
                                    <input name="tel" type="text" id="tel" value="<?php echo $this->_tpl_vars['grs']['tel']; ?>
" size="20"/>
                                    (请留区号)</div></td>
                                </tr>
                                <tr> 
                                  <td width="18%">电子邮件：</td>
                                  <td width="82%" align="left"> <div align="left"> 
                                    <input name="email" type="text" id="email" value="<?php echo $this->_tpl_vars['grs']['email']; ?>
" size="20"/>
                                    <input name="zhongliang" type="hidden" id="zhongliang" value="0" />
                                    </div></td>
                                </tr>
                                <tr bordercolor="#FFFFFF" bordercolorlight="#CCCCCC">
                                  <td height="25" valign="middle">QQ/MSN：</td>
                                  <td height="25" align="left"><input name="qq" type="text" id="qq" value="<?php echo $this->_tpl_vars['grs']['qq']; ?>
 <?php echo $this->_tpl_vars['grs']['msn']; ?>
" size="20" /></td>
                                </tr>
                                
                                <tr> 
                                  <td width="18%">简单留言：</td>
                                  <td width="82%" align="left"> <div align="left"> 
                                    <textarea name="content" cols="50" rows="2" id="content"></textarea>
                                    </div></td>
                                </tr>
                                </table></td>
                            </tr>
                          </table><br />
                          <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
                            <tr> 
                              <td colspan="2" align="left" bgcolor="#f1f1f1">&nbsp;支付方式</td>
                            </tr>
                            <tr bgcolor="#FFFFFF"> 
                              <td width="13%">&nbsp;</td>
                              <td width="87%" align="left" valign="top" bgcolor="#FFFFFF"><table width="98%" border="0" align="center" cellpadding="2" cellspacing="2">
                                <tr> 
                                  <td align="left"><?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['zhifufangshi']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
                                    <input name="zhifufangshi" type="radio" value="<?php echo $this->_tpl_vars['zhifufangshi'][$this->_sections['i']['index']]['x_value']; ?>
"  <?php if ($this->_tpl_vars['zhifufangshi'][$this->_sections['i']['index']]['index'] == '0'): ?>checked="checked"<?php endif; ?> />
                          
                                    <font color="#0066FF"> 
                                      <?php echo $this->_tpl_vars['zhifufangshi'][$this->_sections['i']['index']]['x_text']; ?>
                </font>
                                       <?php if ($this->_tpl_vars['zhifufangshi'][$this->_sections['i']['index']]['x_value'] == 'huokuan'): ?>购买所需Z币：<font style="color:#F00"><?php echo ((is_array($_tmp=$this->_tpl_vars['zongji'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : number_format($_tmp, 2)); ?>
</font>Z币，账号可以使用的Z币：<font style="color:#F00"><?php echo ((is_array($_tmp=$this->_tpl_vars['grs']['tjinqian'])) ? $this->_run_mod_handler('number_format', true, $_tmp, 2) : number_format($_tmp, 2)); ?>
</font>Z币<?php endif; ?> 
                                  <?php echo $this->_tpl_vars['zhifufangshi'][$this->_sections['i']['index']]['content']; ?>
  
                                    <?php endfor; endif; ?></td>
                                </tr>
                                </table>
                              </td>
                            </tr>
                          </table>
                          <br />   
                          <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
                            <tr> 
                              <td colspan="2" align="left" bgcolor="#f1f1f1">配送方式</td>
                            </tr>
                            <tr bgcolor="#FFFFFF"> 
                              <td width="13%">&nbsp;</td>
                              <td width="87%" align="left" valign="top" bgcolor="#FFFFFF"><table width="98%" border="0" align="center" cellpadding="2" cellspacing="2">
                                <tr> 
                                  <td align="left"><?php unset($this->_sections['i']);
$this->_sections['i']['name'] = 'i';
$this->_sections['i']['loop'] = is_array($_loop=$this->_tpl_vars['peisong']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['i']['show'] = true;
$this->_sections['i']['max'] = $this->_sections['i']['loop'];
$this->_sections['i']['step'] = 1;
$this->_sections['i']['start'] = $this->_sections['i']['step'] > 0 ? 0 : $this->_sections['i']['loop']-1;
if ($this->_sections['i']['show']) {
    $this->_sections['i']['total'] = $this->_sections['i']['loop'];
    if ($this->_sections['i']['total'] == 0)
        $this->_sections['i']['show'] = false;
} else
    $this->_sections['i']['total'] = 0;
if ($this->_sections['i']['show']):

            for ($this->_sections['i']['index'] = $this->_sections['i']['start'], $this->_sections['i']['iteration'] = 1;
                 $this->_sections['i']['iteration'] <= $this->_sections['i']['total'];
                 $this->_sections['i']['index'] += $this->_sections['i']['step'], $this->_sections['i']['iteration']++):
$this->_sections['i']['rownum'] = $this->_sections['i']['iteration'];
$this->_sections['i']['index_prev'] = $this->_sections['i']['index'] - $this->_sections['i']['step'];
$this->_sections['i']['index_next'] = $this->_sections['i']['index'] + $this->_sections['i']['step'];
$this->_sections['i']['first']      = ($this->_sections['i']['iteration'] == 1);
$this->_sections['i']['last']       = ($this->_sections['i']['iteration'] == $this->_sections['i']['total']);
?>
                                    <input type="radio" name="peisong" value="<?php echo $this->_tpl_vars['peisong'][$this->_sections['i']['index']]['x_value']; ?>
" <?php if ($this->_tpl_vars['peisong'][$this->_sections['i']['index']]['index'] == '0'): ?>checked="checked"<?php endif; ?>/>
                             
                                    <font color="#0066FF"> 
                                      <?php echo $this->_tpl_vars['peisong'][$this->_sections['i']['index']]['x_text']; ?>
                </font>
                                  <?php echo $this->_tpl_vars['peisong'][$this->_sections['i']['index']]['content']; ?>
  
                                    <?php endfor; endif; ?></td>
                                </tr>
                                </table>
                              </td>
                            </tr>
                          </table>
                          <table width="98%" border="0" align="center">
                            <tr>
                              <td height="33"><div align="center">
                                <input name="btn_save" type="submit" id="btn_save" value="提交到下一步" style="height:25px"/>
                                &nbsp;
                                <input name="btn_b" style="height:25px" type="button" id="btn_b" value="返回上一页" onClick="location.href='cart_list.php'" />
                                </div></td>
                            </tr>
                          </table>
</form></td>
                    </tr>
                  </table>